|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.hierarchy.HierarchyNode
public abstract class HierarchyNode
Base class for all hierarchy classes.
| Constructor Summary | |
|---|---|
HierarchyNode(java.lang.String name,
HNodeType type,
long index)
Creates an instance of HierarchyNode
with the specified name, type and index. |
|
| Method Summary | |
|---|---|
protected HierarchyNode |
clone(HierarchyNode node)
Clones this node. |
boolean |
equals(HierarchyNode node)
Tests if this node equals to the given node. |
HierarchyNode |
getChild(int index)
Returns the child at the specified index. |
long |
getIndex()
Returns the index of this node. |
int |
getIndexOfChild(HierarchyNode child)
Returns the index of specified child. |
int |
getNumberOfChildren()
Returns the number of children. |
HierarchyNode |
getParent()
Returns the parent of this node. |
HierarchyNode |
getParent(java.lang.Class type)
Returns the first anchestor of the given type. |
HNodeType |
getType()
Returns the type of this node. |
protected boolean |
hasNamedChild(HierarchyNode object)
Tests if this node has child which name equals to the name of the given node. |
protected void |
removeChild(HierarchyNode child)
Removes the specified child node. |
void |
setName(java.lang.String name)
Renames this node. |
void |
setParent(HierarchyNode parent)
Sets the parent of this node. |
java.lang.String |
toString()
Returns the name of this node. |
void |
updateName()
Changes the name of this node if the parent of this node has a child with the same name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HierarchyNode(java.lang.String name,
HNodeType type,
long index)
HierarchyNode
with the specified name, type and index.
name - the name of the new nodetype - the type of the new nodeindex - the index of the new node| Method Detail |
|---|
protected void removeChild(HierarchyNode child)
child - child node to be removedprotected HierarchyNode clone(HierarchyNode node)
node - node sent by subclass
public HierarchyNode getChild(int index)
index - index of child
public int getNumberOfChildren()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setName(java.lang.String name)
name - new namepublic int getIndexOfChild(HierarchyNode child)
child - child node which index will be returned
public HNodeType getType()
public long getIndex()
public boolean equals(HierarchyNode node)
node - node that will be compared to this node
true if the given node
equals to this node,
otherwise falsepublic void setParent(HierarchyNode parent)
parent - new parentpublic HierarchyNode getParent()
public HierarchyNode getParent(java.lang.Class type)
type - type of the requested anchestor
protected boolean hasNamedChild(HierarchyNode object)
object - node which name will be tested
true if the name of the given
node equals to the name of this node,
otherwise falsepublic void updateName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||